package org.egedede.processmanager.impl;

import org.egedede.processmanager.ProcessDefinition;
import org.egedede.processmanager.ProcessPack;
import org.egedede.processmanager.events.ProcessEvent;
import org.egedede.processmanager.events.ProcessListener;

public class SequentialPackProcessor implements Runnable, ProcessListener {
	private final ProcessPack pack;

	public SequentialPackProcessor(ProcessPack pack) {
		this.pack = pack;
	}

	@Override
	public void run() {
		for (ProcessDefinition def : this.pack.getPack()) {
			def.addProcessListener(this);
			def.start();
		}
	}

	@Override
	public void processChanged(ProcessEvent e) {

	}

}
